// import js from "@eslint/js";
import globals from 'globals';
import pluginVue from 'eslint-plugin-vue';

export default [
  {
    files: ['**/*.{js,mjs,cjs,vue}'],
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
    },
    rules: {
      'no-unused-vars': 'warn',
      'no-undef': 'warn',
    },
  },
  ...pluginVue.configs['flat/essential'],
  {
    files: ['main/**/*'],
    languageOptions: {
      globals: {
        ...globals.node,
      },
    },
  },
  {
    files: ['renderer/**/*'],
    languageOptions: {
      globals: {
        ...globals.browser,
      },
    },
  },
  {
    ignores: [
      'node_modules/',
      'dist/',
      '*.log',
      '.DS_Store',
      'Thumbs.db',
      '.vscode',
      '.idea',
      '*.db',
      '*.sqlite',
      'temp',
      'tmp',
      'build',
    ],
  },
];
